using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class RollM : MonoBehaviour
{
    public Scrollbar sb;
    public float speed = 0.001f;
    void Start()
    {

    }
    void Update()
    {
        StartCoroutine("SBM");
    }
    IEnumerator SBM()
    {
        yield return new WaitForEndOfFrame();
        if (sb.value <1 )
        {
            sb.value = sb.value + speed;
        }
        else
        {
            sb.value = -0.5f;
        }
    }
}
